﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Data;
using System.Windows.Markup;

namespace Snowdreamist.Windows.Data
{
    public class LanguageExtension : Binding
    {
        public LanguageExtension()
        {
            this.Path = new PropertyPath("Culture");
            this.Source = LanguageManager.Current;
            this.Converter = LanguageManager.Converter;
        }

        /// <summary>
        /// Language resources Key
        /// </summary>
        public string Key
        {
            get
            {
                return this.ConverterParameter as string;
            }
            set
            {
                this.ConverterParameter = value;
            }
        }
    }
}